#!/usr/bin/python
#-*- coding: utf-8 -*-

import urllib
import sys
from xml.dom.minidom import parseString

f = urllib.urlopen('https://aap_ugr:aula-16@api.del.icio.us/v1/posts/recent').read()

arbol = parseString(f)

print "Lista de los últimos enlaces de aap_ugr:"

child = arbol.getElementsByTagName("posts")[0]
for i in range(5):
 post = child.getElementsByTagName("post")[i]
 print post.getAttribute('href')
